package org.ligson.se.api.vo;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class WebResult implements Serializable{
    private boolean success;
    private String errorMsg;
    private String errorCode;
    private Map<String, Object> datas = new HashMap<>();

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public <T> T get(String key) {
        return (T) datas.get(key);
    }

    public void put(String key, Object value) {
        datas.put(key, value);
    }

}
